package com.cskaoyan.exception;

import com.cskaoyan.bean.BaseRespVo;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MarketExceptionHandler {

    @ExceptionHandler(WxErrorException.class)
    public BaseRespVo wxErrorException(WxErrorException exception) {
        exception.printStackTrace();
        return BaseRespVo.fail("wechat error");
    }
}
